package com.example.day05.homework;

import java.util.Date;

public class EmployeeTest {

    public static void main(String[] args) {

        Employee[] employees=new Employee[4];
        Employee e1=new SalariedEmployee("rose",new Date(),1000);
        Employee e2=new HourlyEmployee("LISA",new Date(),170,12);
        Employee e3=new SalesEmployee("balck",new Date(),1000,0.25);
        Employee e4=new BasedPlusSalesEmployee("jennie",new Date(),1000,0.25,2000);

        employees[0]=e1;
        employees[1]=e2;
        employees[2]=e3;
        employees[3]=e4;
//        System.out.println("打印七月份员工的工资：");
//        for (Employee employee : employees) {
//
//            System.out.println(employee.getName()+"\t"+employee.getSalary(6));
//        }
        System.out.println("打印八月份员工的工资：");
        for (Employee employee : employees) {

            System.out.println(employee.getName()+"\t"+employee.getSalary(7));
        }
    }
}
